package lx;

public class demo4 {
    //爬楼梯问题
    public static void main(String[] args) {
        System.out.println(getSum(20));
    }

    public static int getSum(int n) {
        if (n == 1)
            return 1;
        if (n == 2)
            return 2;

        return getSum(n - 1) + getSum(n - 2);
    }
}
